home *** CD-ROM | disk | FTP | other *** search
/ PC Home 109 / PC Home 109.iso / data1.cab / Program_Files / be002.dxr / 00045.ls < prev    next >
Encoding:
Text File  |  2001-03-02  |  1.6 KB  |  81 lines

  1. on exitFrame
  2.   puppetSprite(3, 1)
  3.   puppetSprite(4, 1)
  4.   puppetSprite(5, 1)
  5.   puppetSprite(6, 1)
  6.   if the timer > 2400 then
  7.     repeat with n = 20 down to 1
  8.       puppetSprite(n, 0)
  9.       set the visible of sprite n to 1
  10.     end repeat
  11.     go(155)
  12.   else
  13.     duck1()
  14.     duck2()
  15.     duck3()
  16.     duck4()
  17.     go(the frame)
  18.   end if
  19. end
  20.  
  21. on duck1
  22.   set the locH of sprite 3 to the locH of sprite 3 + random(10)
  23.   set temp to random(2)
  24.   if temp = 1 then
  25.     set the locV of sprite 3 to 301
  26.   else
  27.     set the locV of sprite 3 to 300
  28.   end if
  29.   if the locH of sprite 3 > 690 then
  30.     set the locH of sprite 3 to -50
  31.   end if
  32. end
  33.  
  34. on duck2
  35.   set the locH of sprite 4 to the locH of sprite 4 - random(15)
  36.   set temp to random(2)
  37.   if temp = 1 then
  38.     set the locV of sprite 4 to 352
  39.   else
  40.     set the locV of sprite 4 to 351
  41.   end if
  42.   if the locH of sprite 4 < -50 then
  43.     set the locH of sprite 4 to 690
  44.   end if
  45. end
  46.  
  47. on duck3
  48.   set the locH of sprite 5 to the locH of sprite 5 + random(15)
  49.   set temp to random(2)
  50.   if temp = 1 then
  51.     set the locV of sprite 5 to 386
  52.   else
  53.     set the locV of sprite 5 to 387
  54.   end if
  55.   if the locH of sprite 5 > 690 then
  56.     set the locH of sprite 5 to -50
  57.   end if
  58. end
  59.  
  60. on duck4
  61.   set the locH of sprite 6 to the locH of sprite 6 - random(10)
  62.   set temp to random(2)
  63.   if temp = 1 then
  64.     set the locV of sprite 6 to 418
  65.   else
  66.     set the locV of sprite 6 to 419
  67.   end if
  68.   if the locH of sprite 6 < -50 then
  69.     set the locH of sprite 6 to 690
  70.   end if
  71. end
  72.  
  73. on mouseUp
  74.   sound stop 1
  75.   repeat with n = 20 down to 1
  76.     puppetSprite(n, 0)
  77.     set the visible of sprite n to 1
  78.   end repeat
  79.   go(155)
  80. end
  81.